/** 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package it.free.i.virtual.machine.hal.devicealias;

import it.free.i.virtual.Identifiable;
import it.free.i.virtual.Linkable;
import it.free.i.virtual.machine.hal.DeviceAliasRuntimeException;
import it.free.i.virtual.machine.hal.EnumerationOperationException;
import it.free.i.virtual.machine.hal.devicealias.port.DeviceAliasPort;

import java.util.List;

import javax.management.DynamicMBean;
import javax.management.NotificationListener;

/**  
 * A virtual entity to translate and normalize a physical resource into a software one
 * A population of these objects in the interface between the real and the virtual world
 * This impl is the standard observer/observable pattern realizing a command pattern
 * Every DeviceAlias will receive a command dto
 * @author stefano
 */
public interface DeviceAlias extends DynamicMBean, NotificationListener, Identifiable, Linkable {
	
	public static final String IMPL_CLASS_PROP_NAME = "devicealias.implementation.class";
	public static final String IMPL_NAME_PROP_NAME = "devicealias.implementation.name";
	
	/**
	 * Get the list of channels for this device alias 
	 * @throws EnumerationOperationException
	 * @return the List of channel
	 */
	public List<DeviceAliasPort> getPorts() throws EnumerationOperationException;
	
	/**
	 * Define the paradigm whose consequence should be that every device has a reset
	 * @throws DeviceAliasRuntimeException
	 */
	public void reset() throws DeviceAliasRuntimeException;

}
